package com.soft.javase.day04.computer;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/21
 */
public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();

        IStorage uPan = new UPan();
        computer.setStorage(uPan);
        computer.readData();
        computer.writeData();

        IStorage hardDisk = new MobileHardDisk();
        computer.setStorage(hardDisk);
        computer.readData();
        computer.writeData();

        IStorage mp3 = new MP3();
        computer.setStorage(mp3);
        computer.readData();
        computer.writeData();
        computer.playMusicOnMP3();
    }
}
